package org.zeqp.chatAI.aiterface.chat;

public class ChatResponse {
    /*本轮对话的id*/
    public String id;
    /*回包类型
            chat.completion：多轮对话返回
            */

    /*时间戳*/
    public Integer created;

    /*表示当前子句的序号。只有在流式接口模式下会返回该字段*/
    public Integer sentence_id;

    /* 表示当前子句是否是最后一句。只有在流式接口模式下会返回该字段 */
    public boolean is_end;
    /* 当前生成的结果是否被截断 */
    public boolean is_truncated;

    /*
    * 输出内容标识，说明：
    · normal：输出内容完全由大模型生成，未触发截断、替换
    · stop：输出结果命中入参stop中指定的字段后被截断
    · length：达到了最大的token数，根据EB返回结果is_truncated来截断
    · content_filter：输出内容被截断、兜底、替换为**等
    · function_call：调用了funtion call功能
    * */
    public  String finish_reason;

    /*搜索数据，当请求参数enable_citation为true并且触发搜索时，会返回该字段*/
    public SearchInfo search_info;

    /*对话返回结果*/
    public String result;

    /*表示用户输入是否存在安全，是否关闭当前会话，清理历史会话信息
    true：是，表示用户输入存在安全风险，建议关闭当前会话，清理历史会话信息
    false：否，表示用户输入无安全风险*/
    public boolean need_clear_history;
    /*当need_clear_history为true时，此字段会告知第几轮对话有敏感信息，如果是当前问题，ban_round=-1*/
    public Integer ban_round;

    public Usage usage;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getCreated() {
        return created;
    }

    public void setCreated(Integer created) {
        this.created = created;
    }

    public Integer getSentence_id() {
        return sentence_id;
    }

    public void setSentence_id(Integer sentence_id) {
        this.sentence_id = sentence_id;
    }

    public boolean isIs_end() {
        return is_end;
    }

    public void setIs_end(boolean is_end) {
        this.is_end = is_end;
    }

    public boolean isIs_truncated() {
        return is_truncated;
    }

    public void setIs_truncated(boolean is_truncated) {
        this.is_truncated = is_truncated;
    }

    public String getFinish_reason() {
        return finish_reason;
    }

    public void setFinish_reason(String finish_reason) {
        this.finish_reason = finish_reason;
    }

    public SearchInfo getSearch_info() {
        return search_info;
    }

    public void setSearch_info(SearchInfo search_info) {
        this.search_info = search_info;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public boolean isNeed_clear_history() {
        return need_clear_history;
    }

    public void setNeed_clear_history(boolean need_clear_history) {
        this.need_clear_history = need_clear_history;
    }

    public Integer getBan_round() {
        return ban_round;
    }

    public void setBan_round(Integer ban_round) {
        this.ban_round = ban_round;
    }

    public Usage getUsage() {
        return usage;
    }

    public void setUsage(Usage usage) {
        this.usage = usage;
    }
}
